home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Laboratorio Interattivo Deagostini
/
laboratorio interattivo deagostini.bin
/
swf
/
408.swf
/
scripts
/
frame_1
/
PlaceObject2_4_3
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2003-01-07
|
2KB
|
83 lines
onClipEvent(enterFrame){
function verifica()
{
var i = 0;
var giusto = 0;
i = 0;
while(i < lista.length)
{
clipBase = lista[i][2];
var testoInserito = _root[clipBase].lettera;
var l = 1;
daScrivere = lista[i][0];
l = 1;
while(l < daScrivere.length)
{
nomeCLip = clipBase + l;
testoInserito += _root[nomeCLip].lettera;
l++;
}
if(testoInserito.toLowerCase() == lista[i][0].toLowerCase())
{
giusto += 1;
}
i++;
}
if(giusto == lista.length)
{
_root.conferma._x = 2000;
getUrl("Finito:Giusto", "");
}
else
{
getUrl("Finito:Sbagliato", "");
}
_root.AvviaVerifica = 0;
}
function cliprilasciata(cheistanza)
{
var problema = 0;
var i = 0;
i = 0;
while(i < lista.length)
{
if(lista[i][2].toLowerCase() == cheistanza.substring(0,5).toLowerCase())
{
problema = 1;
var trovato = 0;
var e = 0;
e = 0;
while(e < lista[i][5].length)
{
if(lista[i][5][e] != cheistanza)
{
daIntercettare = "_root." + lista[i][5][e];
if(eval(daIntercettare).hitTest(_root._xmouse,_root._ymouse,true))
{
trovato = 1;
_root[cheistanza]._x = _root[cheistanza].xorig;
_root[cheistanza]._y = _root[cheistanza].yorig;
var mossa = _root[cheistanza].lettera;
var desti = eval(daIntercettare).lettera;
eval(daIntercettare).lettera = mossa;
_root[cheistanza].lettera = desti;
break;
}
}
e++;
}
if(trovato == 0 || problema == 0)
{
_root[cheistanza]._x = _root[cheistanza].xorig;
_root[cheistanza]._y = _root[cheistanza].yorig;
}
}
i++;
}
}
if(_root.AvviaVerifica == "1")
{
Verifica();
}
}